import { RouteRecordRaw } from 'vue-router';

//静态路由(固定的)
export const staticRoutes: Array<RouteRecordRaw> = [
  {
    path: '/',
    redirect: '/login',
  },
  {
    path: '/login',
    meta: {
      title: '登录',
    },
    component: () => import('@/views/login/Index.vue'),
  },
  {
    path: '/layout',
    name: 'layout',
    component: () => import('@/views/layout/Layout.vue'),
  },
];

//动态路由 -- 学生权限
export const stuRoutes: Array<RouteRecordRaw> = [
  {
    path: '/home',
    name: '/home',
    component: () => import('@/views/student/home/Index.vue'),
    meta: {
      title: '首 页',
      breadcrumb: '首 页',
    },
  },
  {
    path: '/stuInfo',
    name: '/stuInfo',
    component: () => import('@/views/student/stuInfo/Index.vue'),
    meta: {
      title: '班级同学',
      breadcrumb: '班级同学',
    },
  },
  {
    path: '/coSelection',
    name: '/coSelection',
    meta: {
      title: '自主选课',
      breadcrumb: '自主选课',
    },
    component: () => import('@/views/student/coSelection/Index.vue'),
  },
  {
    path: '/selectedCourse',
    name: '/selectedCourse',
    meta: {
      title: '已选课程',
      breadcrumb: '已选课程',
    },
    component: () => import('@/views/student/selectedCourse/Index.vue'),
  },
  {
    path: '/scoreSearch',
    name: '/scoreSearch',
    component: () => import('@/views/student/scoreSearch/Index.vue'),
    meta: {
      title: '成绩查询',
      breadcrumb: '成绩查询',
      remarks: ''
    },
  },
  {
    path: '/scoreAnalyse',
    name: '/scoreAnalyse',
    meta: {
      title: '成绩分析',
      breadcrumb: '成绩分析',
    },
    component: () => import('@/views/student/scoreAnalyse/Index.vue'),
  },
];

//动态路由 -- 老师权限
export const tchRoutes: Array<RouteRecordRaw> = [
  {
    path: '/home',
    name: '/home',
    component: () => import('@/views/teacher/home/Index.vue'),
    meta: {
      title: '首 页',
      breadcrumb: '首 页',
    },
  },
  {
    path: '/courseTable',
    name: '/courseTable',
    meta: {
      title: '我的课表',
    },
    component: () => import('@/views/teacher/courseTable/Index.vue'),
  },
  {
    path: '/myCourse',
    name: '/myCourse',
    meta: {
      title: '我的课程',
      breadcrumb: '我的课程',
    },
    component: () => import('@/views/teacher/myCourse/Index.vue'),
  },
  {
    path: '/scoreInfo',
    name: '/scoreInfo',
    component: () => import('@/views/teacher/scoreInfo/Index.vue'),
    meta: {
      title: '成绩录入',
      breadcrumb: '成绩录入',
      remarks: '先选择课程表格，再展示学生成绩表格(表格中直接录入的形式)'
    },
  },
  {
    path: '/scoreSearch',
    name: '/scoreSearch',
    component: () => import('@/views/teacher/scoreSearch/Index.vue'),
    meta: {
      title: '成绩查询',
      breadcrumb: '成绩查询',
      remarks: ''
    },
  },
];

//动态路由 -- 管理员老师权限
export const adminRoutes: Array<RouteRecordRaw> = [
  {
    path: '/home',
    name: '/home',
    component: () => import('@/views/teacher/home/Index.vue'),
    meta: {
      title: '首 页',
      breadcrumb: '首 页',
    },
  },
  {
    path: '/courseTable',
    name: '/courseTable',
    meta: {
      title: '我的课表',
    },
    component: () => import('@/views/teacher/courseTable/Index.vue'),
  },
  {
    path: '/myCourse',
    name: '/myCourse',
    meta: {
      title: '我的课程',
      breadcrumb: '我的课程',
    },
    component: () => import('@/views/teacher/myCourse/Index.vue'),
  },
  {
    path: '/stuInfo',
    name: '/stuInfo',
    component: () => import('@/views/admin/stuInfo/Index.vue'),
    meta: {
      title: '学生管理',
      breadcrumb: '学生管理',
    },
  },
  {
    path: '/tchInfo',
    name: '/tchInfo',
    component: () => import('@/views/admin/tchInfo/Index.vue'),
    meta: {
      title: '教师管理',
      breadcrumb: '教师管理',
    },
  },
  {
    path: '/course',
    name: '/course',
    meta: {
      title: '课程管理',
      breadcrumb: '课程管理',
      remarks: '在课程表格中可选择某一项进行选课学生的查看(抽屉形式弹出，展示学生信息表格)'
    },
    children: [
      {
        path: '/courseInfo',
        name: '/courseInfo',
        component: () => import('@/views/admin/courseInfo/Index.vue'),
        meta: {
          title: '课程信息',
          breadcrumb: '课程管理 / 课程信息',
        },
      },
      {
        path: '/courseSelection',
        name: '/courseSelection',
        meta: {
          title: '选课时间管理',
          breadcrumb: '课程管理 / 选课时间管理',
        },
        component: () => import('@/views/admin/coSelection/Index.vue'),
      },
    ],
  },
  {
    path: '/score',
    name: '/score',
    meta: {
      title: '成绩管理',
      breadcrumb: '成绩管理'
    },
    children: [
      {
        path: '/scoreInfo',
        name: '/scoreInfo',
        component: () => import('@/views/teacher/scoreInfo/Index.vue'),
        meta: {
          title: '成绩录入',
          breadcrumb: '成绩管理 / 成绩录入',
          remarks: '先选择课程表格，再展示学生成绩表格(表格中直接录入的形式)'
        },
      },
      {
        path: '/scoreTime',
        name: '/scoreTime',
        component: () => import('@/views/admin/scoreTime/Index.vue'),
        meta: {
          title: '成绩录入时间管理',
          breadcrumb: '成绩管理 / 成绩录入时间管理',
        },
      },
      {
        path: '/myScoreSearch',
        name: '/myScoreSearch',
        component: () => import('@/views/teacher/scoreSearch/Index.vue'),
        meta: {
          title: '我的课程成绩查询',
          breadcrumb: '成绩管理 / 我的课程成绩查询'
        },
      },
      {
        path: '/scoreSearch',
        name: '/scoreSearch',
        component: () => import('@/views/admin/scoreSearch/Index.vue'),
        meta: {
          title: '所有课程成绩查询',
          breadcrumb: '成绩管理 / 所有课程成绩查询'
        },
      },
    ],
   
  },
];


//动态路由 -- 管理员老师权限
// export const adminRoutes: Array<RouteRecordRaw> = [
//   {
//     path: '/home',
//     name: '/home',
//     component: () => import('@/views/teacher/home/Index.vue'),
//     meta: {
//       title: '首 页',
//       breadcrumb: '首 页',
//     },
//   },
//   {
//     path: '/courseTable',
//     name: '/courseTable',
//     meta: {
//       title: '我的课表',
//     },
//     component: () => import('@/views/teacher/courseTable/Index.vue'),
//   },
//   {
//     path: '/stuInfo',
//     name: '/stuInfo',
//     component: () => import('@/views/admin/stuInfo/Index.vue'),
//     meta: {
//       title: '学生管理',
//       breadcrumb: '学生管理',
//     },
//   },
//   {
//     path: '/tchInfo',
//     name: '/tchInfo',
//     component: () => import('@/views/admin/tchInfo/Index.vue'),
//     meta: {
//       title: '教师管理',
//       breadcrumb: '教师管理',
//     },
//   },
//   {
//     path: '/courseInfo',
//     name: '/courseInfo',
//     component: () => import('@/views/admin/courseInfo/Index.vue'),
//     meta: {
//       title: '课程管理',
//       breadcrumb: '课程管理',
//       remarks: '在课程表格中可选择某一项进行选课学生的查看(抽屉形式弹出，展示学生信息表格)'
//     },
//   },
//   {
//     path: '/myCourse',
//     name: '/myCourse',
//     meta: {
//       title: '我的课程',
//       breadcrumb: '我的课程',
//     },
//     component: () => import('@/views/teacher/myCourse/Index.vue'),
//   },
//   {
//     path: '/scoreInfo',
//     name: '/scoreInfo',
//     component: () => import('@/views/teacher/scoreInfo/Index.vue'),
//     meta: {
//       title: '成绩录入',
//       breadcrumb: '成绩录入',
//       remarks: '先选择课程表格，再展示学生成绩表格(表格中直接录入的形式)'
//     },
//   },
//   {
//     path: '/scoreSearch',
//     name: '/scoreSearch',
//     component: () => import('@/views/admin/scoreSearch/Index.vue'),
//     meta: {
//       title: '所有课程成绩查询',
//       breadcrumb: '所有课程成绩查询',
//       remarks: ''
//     },
//   },
//   {
//     path: '/myScoreSearch',
//     name: '/myScoreSearch',
//     component: () => import('@/views/teacher/scoreSearch/Index.vue'),
//     meta: {
//       title: '我的课程成绩查询',
//       breadcrumb: '我的课程成绩查询',
//       remarks: ''
//     },
//   },
//   {
//     path: '/courseSelection',
//     name: '/courseSelection',
//     meta: {
//       title: '选课时间管理',
//       breadcrumb: '选课时间管理',
//     },
//     component: () => import('@/views/admin/coSelection/Index.vue'),
//   },
//   {
//     path: '/scoreTime',
//     name: '/scoreTime',
//     component: () => import('@/views/admin/scoreTime/Index.vue'),
//     meta: {
//       title: '成绩录入时间管理',
//       breadcrumb: '成绩录入时间管理',
//     },
//   },
// ];
